program Fibonacci;

var
  i, x, m, n : integer;

begin   {Begins the main part}

  writeln ('Enter the lenghts of the sequence');
  readln (x);
  n := 0; m:=1; {We have to initialize our sequence}
  writeln (n);  {and have the first output}
  writeln (m);
  i:=0;         {"i" is the number of the current iteration}


while i<x-2 do  {The first 2 "x's" we've already had
                 that's why we must get rid of them}

begin           {Begins the iteration loop}

  i:=i+1;
  m:=m+n; n:=m-n;
  writeln(m);

  if i=x-2 then writeln('Finished !');

                {The program has calculated everything
                 and lets us know about it}

end;            {The end of the while-do loop}

  readln;       {This is needed to have enough time
                 to read the output}

end.